package com.study.signin_demo2.controller;

import com.study.signin_demo2.entity.User;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;

/**
 * 打招呼controller
 * @author whx
 * @date 2022/2/17
 * 注释/备注/代码说明
 */
// 声明为controller,并且返回json字符串类型数据
@RestController
// 代码冗余
@RequestMapping("hello")
public class HelloController {

    @GetMapping("hello")
    public String hello(String name,String age){
        return "hello: "+name+","+age;
    }

    @PostMapping("hello2")
    public String hello2(@RequestBody User user){

        return "";
    }

}
